<?php

namespace app\model;
use think\model\relation\HasOne;

/**
 * @property integer $id 主键(主键)
 * @property string $created_at 创建时间
 * @property string $updated_at 更新时间
 * @property string $deleted_at 删除时间
 * @property integer $user_id 用户ID
 * @property integer $fish_id 鱼ID
 * @property integer $num 数量
 */
class UserFish extends Base
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'wa_user_fish';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';


    public function fish(): HasOne
    {
        return $this->hasOne(Fish::class,'id','fish_id')->bind([
            'cn_name',
            'details',
            'type'
        ]);

    }
    
    
    
}
